#ifndef _COMPONENT_H
#define _COMPONENT_H
#include <string>
using namespace std;

class Component
{
public:
	Component(std::string _name);
	virtual ~Component();

	virtual void Print() = 0;
	void ShowName();
	virtual void Add(Component* cmp);
	virtual void Remove(Component* cmp);
	virtual Component* GetChild(int nIndex);

protected:
	std::string m_name;
};

class Leaf : public Component
{
public:
	Leaf(std::string _name);
	~Leaf();

	void Print();
};

#endif